﻿package view.containers 
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.filters.DropShadowFilter;
	
	/**
	 * ...
	 * @author Slavshik Alexander
	 */
	public class PhotoContainer extends Sprite
	{
		private var bmp:Bitmap;
		private var bg:Shape = new Shape();
		
		public function PhotoContainer(bmpd:BitmapData) {
			bmp = new Bitmap(bmpd);
			bmp.smoothing = true;
			bmp.x = -bmp.width * 0.5;
			bmp.y = -bmp.height * 0.5;
			bg.graphics.beginFill(0xffffff);
			bg.graphics.drawRect(0, 0, bmp.width + 10, bmp.height + 10);
			bg.x = bmp.x - 5;
			bg.y = bmp.y - 5;
			addChild(bg);
			addChild(bmp);
			filters = [new DropShadowFilter(2, 45, 0, 0.5, 4, 4, 1, 3)];
		}
		
	}
	
}
